--- libvmime-0.7.1/src/headerField.cpp	2007-07-31 12:54:21.898679250 +0200
+++ libvmime-0.7.1.patched/src/headerField.cpp	2007-07-31 12:43:08.408588750 +0200
@@ -189,6 +189,14 @@
 					}
 				}
 
+				// strip spaces from end of header lines, also through continuation headers
+				contentsEnd--;	// original enter
+				while (contentsEnd>contentsStart &&
+					   (buffer[contentsEnd] == ' ' || buffer[contentsEnd] == '\t' ||
+						buffer[contentsEnd] == '\r' || buffer[contentsEnd] == '\n'))
+					contentsEnd--;
+				contentsEnd++;	// new 'enter'
+
 				// Return a new field
 				headerField* field = headerFieldFactory::getInstance()->create(name);
 
